@extends('app')

@section('content')
    @include('layouts.breadcrumb')

    <div class="layui-tab layui-tab-brief" style="padding: 10px 20px">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
            <legend>更新记录</legend>
        </fieldset>

        <ul class="layui-timeline">
            <li class="layui-timeline-item">
                <i class="layui-icon layui-timeline-axis"></i>
                <div class="layui-timeline-content layui-text">
                    <div class="layui-timeline-title">
                        <button class="layui-btn layui-btn-sm" onclick="newWindow('添加记录','/version/edit',650,350)">添加记录</button>
                    </div>
                </div>
            </li>
            @foreach($model as $item)
                <li class="layui-timeline-item">
                    <i class="layui-icon layui-timeline-axis"></i>
                    <div class="layui-timeline-content layui-text">
                        <div class="layui-timeline-title">
                            <h2 style="display: inline-block;">{{ $item->title }}</h2>
                            <span class="layui-badge-rim" style="top: -2px;left: 10px;">{{ date('Y-m-d',strtotime($item->created_at)) }}</span>
                        </div>
                        {{ $item->content }}
                    </div>
                </li>
            @endforeach
        </ul>
    </div>
@endsection

@section('js')
    <script>
        layui.config({
            version:false
        }).use('table', function() {
            var table = layui.table;
            var form = layui.form;
            var $ = layui.$;
        })
        </script>
@endsection
